home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
autocad
/
acadfont.arj
/
BIGLET.LSP
< prev
next >
Wrap
Text File
|
1992-01-26
|
5KB
|
166 lines
;COPYRIGHT 1992 OMEGA ENGINEERING SOFTWARE
(DEFUN ZOOMW ()
(COMMAND "ZOOM" "W" (LIST (- (CAR PT1) 20) (- (CADR PT1) 20) 0) (LIST (+ (+ (CAR PT1) 20) (* SC 14 4)) (CADR PT1) 0))
)
(DEFUN PLOTLET ()
(SETQ TEMPPT (LIST (CADR (CAR LTEMP)) (CADDR (CAR LTEMP)) 0))
(SETQ TEMPPT1 (LIST (CADR (CAR LTEMP)) (CADDR (CAR LTEMP)) 0))
(SETQ I 1)
(REPEAT (- (CAR POS) 1)
(IF (= (CAR (NTH I LTEMP)) 1)
(COMMAND "PLINE" TEMPPT "W" WI WI (LIST (CADR (NTH I LTEMP)) (CADDR (NTH I LTEMP)) 0) "")
(COMMAND "PLINE" TEMPPT "W" WI WI "ARC" (LIST (CADR (NTH I LTEMP)) (CADDR (NTH I LTEMP)) 0) "")
)
(SETQ EN1 (ENTLAST))
(SETQ PT (CDR (ASSOC 10 (ENTGET (ENTNEXT EN1)))))
(IF (> I 1)
(COMMAND "PEDIT" TEMPPT1 "JOIN" PT "" ^C)
)
(SETQ TEMPPT (LIST (CADR (NTH I LTEMP)) (CADDR (NTH I LTEMP)) 0))
(SETQ I (+ I 1))
)
(SETQ TEMPPT (LIST (CADR (NTH I LTEMP)) (CADDR (NTH I LTEMP)) 0))
(SETQ TEMPPT1 (LIST (CADR (NTH I LTEMP)) (CADDR (NTH I LTEMP)) 0))
(REPEAT (- (CADR POS) 1)
(IF (= (CAR (NTH (+ I 1) LTEMP)) 1)
(COMMAND "PLINE" TEMPPT "W" WI WI (LIST (CADR (NTH (+ I 1) LTEMP)) (CADDR (NTH (+ I 1) LTEMP)) 0) "")
(COMMAND "PLINE" TEMPPT "W" WI WI "ARC" (LIST (CADR (NTH (+ I 1) LTEMP)) (CADDR (NTH (+ I 1) LTEMP)) 0) "")
)
(SETQ EN1 (ENTLAST))
(SETQ PT (CDR (ASSOC 10 (ENTGET (ENTNEXT EN1)))))
(IF (> I (CAR POS))
(COMMAND "PEDIT" TEMPPT1 "JOIN" PT "" ^C)
)
(SETQ I (+ I 1))
(SETQ TEMPPT (LIST (CADR (NTH I LTEMP)) (CADDR (NTH I LTEMP)) 0))
)
)
(DEFUN PARSL ()
(SETQ L (READ L))
(SETQ BOXX (* SC (NTH 3 L)))
(SETQ BOXY (* SC 16))
(SETQ PYB (/ WI 2.0))
(SETQ PYT (- BOXY (/ WI 2.0)))
(SETQ PXL (/ WI 2.0))
(SETQ PXR (- BOXX (/ WI 2.0)))
(SETQ PB (- (/ BOXY 2) (* WI 0.25)))
(SETQ PX1 (+ (* SC 2.0) (/ WI 2)))
(SETQ PX2 (- BOXX (+ (* SC 2.0) (/ WI 2.0))))
(SETQ PY1 (+ (* SC 2.0) (/ WI 2.0)))
(SETQ PY2 (- (- BOXY (* SC 2)) (/ WI 2.0)))
(SETQ PY3 (+ (/ BOXY 2) (* SC 2)))
(SETQ PY4 (- (/ BOXY 2) (* SC 2)))
(SETQ POS (LIST (CADR L) (CADDR L) (NTH 3 L)))
(SETQ LEN (LENGTH L))
(SETQ I 4)
(SETQ K 1)
(SETQ LT (LIST (CAR L) (CADR L) (CADDR L) (NTH 3 L) (NTH 4 L)))
(REPEAT (- LEN 5)
(SETQ I (+ I 1))
(SETQ K (+ K 1))
(IF (< K 4)
(PROGN
(IF (NUMBERP (NTH I L))
(SETQ LT1 (* SC (NTH I L)))
(SETQ LT1 (NTH I L))
)
)
(PROGN
(SETQ K 1)
(SETQ LT1 (NTH I L))
)
)
(SETQ LT (APPEND LT (LIST LT1)))
)
(SETQ L LT)
(SETQ L (SUBST PXL 'PXL L))
(SETQ L (SUBST PXR 'PXR L))
(SETQ L (SUBST PYT 'PYT L))
(SETQ L (SUBST PYB 'PYB L))
(SETQ L (SUBST PB 'PB L))
(SETQ L (SUBST PX1 'PX1 L))
(SETQ L (SUBST PX2 'PX2 L))
(SETQ L (SUBST PY1 'PY1 L))
(SETQ L (SUBST PY2 'PY2 L))
(SETQ L (SUBST PY3 'PY3 L))
(SETQ L (SUBST PY4 'PY4 L))
(SETQ LTEMP NIL)
(SETQ I 0)
(REPEAT (/ (- LEN 4) 3)
(SETQ LTEMP (APPEND LTEMP (LIST (LIST (NTH (+ I 4) L)
(+ (CAR PT1) (NTH (+ I 5) L))
(+ (CADR PT1) (NTH (+ I 6) L))))))
(SETQ I (+ I 3))
)
(PLOTLET)
)
(DEFUN FINDLET ()
(SETQ L (READ-LINE FP))
(WHILE (AND (/= L NIL) (/= LET (SUBSTR L 3 1)))
(SETQ L (READ-LINE FP))
)
(IF (/= L NIL)
(PARSL)
)
)
(DEFUN PARSSTR ()
(SETQ LETNUM (+ LETNUM 1))
(SETQ LET (SUBSTR STR LETNUM 1))
(FINDLET)
(IF (/= L NIL)
(SETQ PT1 (LIST (+ (CAR PT1) (* SC (+ (CADDR POS) 2))) (CADR PT1) (CADDR PT1)))
(SETQ PT1 (LIST (+ (CAR PT1) (* SC 14)) (CADR PT1) (CADDR PT1)))
)
)
(DEFUN C:BIGLET (/ PT1 HE WI STR LETNUM SC PB FP LET L BOXX BOXY PYT PYB
PXL PXR PY1 PY2 PY3 PY4 PB I LTEMP K PT TEMPT TEMPT1
EN1 POS LEN PX1 PX2 LT LT1)
(SETQ PT1 (GETPOINT "\nSTART POINT :"))
(SETQ HE (GETREAL "\nHEIGHT :"))
(SETQ WI (GETREAL "\nWIDTH :"))
(SETQ STR (GETSTRING 2 "\nTEXT :"))
(IF (< 0.18 (/ WI HE ))
(SETQ WI (* 0.18 HE))
)
(SETQ LETNUM 0)
(SETQ SC (/ HE 16))
(SETQ PB (GETVAR "PICKBOX"))
(SETVAR "PICKBOX" 1)
(SETQ FP (OPEN "BIGLET.DAT" "r"))
(IF (/= FP NIL)
(PROGN
(REPEAT (STRLEN STR)
(IF (= (REM LETNUM 4) 0)
(ZOOMW)
)
(PARSSTR)
(CLOSE FP)
(SETQ FP (OPEN "BIGLET.DAT" "r"))
)
(CLOSE FP)
)
(PROMPT "\nFILE BIGLET.DAT FILE NOT FOUND :")
)
(SETVAR "PICKBOX" PB)
)